<template>
  <dt-modal-info ref='modal' title='年底奖金明细' :label-width='130' :width='850'>
    <div slot='bottom' style="padding: 20px 20px 50px 20px;">
      <dt-grid slot='bottom' height-resize ref="table" :onFetch='onFetch'></dt-grid>
    </div>
  </dt-modal-info>
</template>

<script>
  import Opt from '../opt/YearOpt.js'
  import Column from '../opt/YearColumn.js'
  import yearMgr from '@/biz/bonus/billYear'
  
  export default {
    data() {
      return {
        info: {},
      }
    },
    mounted() {
    },
    methods: {
      show(info) {
        this.info = info
        this.$refs.modal.show(new Opt(this.info))
        this.$refs.table.init(this, new Column())
        this.$refs.table.fetch()
      },
      hide() {
        this.$refs.modal.hide()
      },
      onFetch() {
        return yearMgr.monthList(this.info.bonusDetailId, this.info.userId)
      }
    }
  }
</script>

<style>
</style>
